/* 
 * File:   GenericContingencyMatrix.h
 * Author: Guilherme Monteiro
 *
 */

#ifndef GENERICMETRICSVECTOR
#define	GENERICMETRICSVECTOR

#include <vector>
#include <string>

#include "CompatibilityAnswersException.h"

using namespace std;

/**
 * True positive = correctly identified
 * False positive = incorrectly identified
 * True negative = correctly rejected
 * False negative = incorrectly rejected
 */

class GenericMetricsVector {
public:
    GenericMetricsVector(string uAnsPath, string sAnsPath);
    GenericMetricsVector(const GenericMetricsVector& orig);
    virtual ~GenericMetricsVector();
    
    int getNumCellsUser();
    int getNumCellsSoft();
    
    double getTP();
    double getTN();
    double getFP();
    double getFN();
    double getTPR();
    double getFPR();
    
    string getUAnsPath() const;
    string getSAnsPath() const;
    
private:
    
protected:
    double TP;
    double TN;
    double FP;
    double FN;
    double TPR;
    double FPR;
    
    int numCellsSoft;
    int numCellsUser;
    
    string uAnsPath;
    string sAnsPath;
    
    void setTP(double TP);
    void setTN(double TN);
    void setFP(double FP);
    void setFN(double FN);
    void setTPR();
    void setFPR();
    
    void setNumCellsSoft(int num);
    void setNumCellsUser(int num);
    
    void setUAnsPath(string uAnsPath);
    void setSAnsPath(string sAnsPath);
    
    virtual void calculateMetricsVector() throw(CompatibilityAnswersException) = 0;
    virtual void setSoftwareAnswers(string sOutputPath, string uAnsPath) = 0;
    virtual void setUserAnswers(string uAnsPath) = 0;
};

#endif	/* GENERICMETRICSVECTOR */

